schmidt

schmidt(base)
Prgm
Local i,base1,base2,ps,a,b,e,z,t,a,res
dim(base)ài
Try
      dim(i)àa
Else
      goto passe
EndTry
schmimat(base)
Goto fin
Lbl passe
newList(i)àbase1
newList(i)àbase2
ò(f*g,x,0,1)àps(f,g)
ClrIO
Disp "Produit scalaire utilisé:"
Pause ps(f(x),g(x))
base[1]àbase1[1]
For a,2,i
      base[a]àres
      For b,1,a-1
            -ps(base1[b],base[a])/(Öps(base1[b],base1[b]))àa
            res+a*base1[b]àres
      EndFor
      resàbase1[a]
EndFor
For a,1,i
      base1[a]/(Ö(ps(base1[a],base1[a])))àb
      If dim(string(expand(b)))>dim(string(factor(b))) Then
            factor(b)àb
      Else
            expand(b)àb
      EndIf
      bàbase2[a]
EndFor
ClrIO
Lbl aff
Output 0,0,"Base non normée:"
Pause base1
Disp "Base normée:"
Pause base2
Goto aff
Lbl fin
EndPrgm